<script>

	function confirma() {
		
		return confirm('Confirma exclusão da agenda?');
	}
	
</script>

<?php

	$this->Html->script(array('jquery.maskedinput-1.2.2.min','maskinput','jquery.ui.datepicker-pt-BR','datepicker'), false);
	
	echo '<fieldset><legend>Dados</legend>';
	echo $this->Form->create('Agenda', array('onsubmit' => 'return confirma();'));
	echo $this->Form->input('data_inicial', array('label' => __('Data Inicial'), 'type' => 'text', 'class' => 'maskdata data'));
	echo $this->Form->input('data_final', array('label' => __('Data Final'), 'type' => 'text', 'class' => 'maskdata data'));
	echo $this->Form->input('medico_id', array('label' => __('Médico'), 'type' => 'select', 'options' => $medicos, 'empty' => 'Selecione...'));
	echo $this->Form->input('segunda', array('type'=> 'checkbox', 'checked' => 'checked', 'div' => array('style' => 'clear:left')));
	echo $this->Form->input('terca', array('type'=> 'checkbox', 'checked' => 'checked'));
	echo $this->Form->input('quarta', array('type'=> 'checkbox', 'checked' => 'checked'));
	echo $this->Form->input('quinta', array('type'=> 'checkbox', 'checked' => 'checked'));
	echo $this->Form->input('sexta', array('type'=> 'checkbox', 'checked' => 'checked'));
	echo $this->Form->input('sabado', array('type'=> 'checkbox', 'checked' => 'checked', 'label' => 'Sábado'));
	echo '<div class="botoes_form">';
	echo $this->Form->button('Excluir', array('type' => 'submit'));
	echo '</div>'; 
	echo $this->Form->end();
	echo '</fieldset>';
	
	if (@$resultado) {
		echo '<fieldset><legend>Resultado:</legend>';
		echo $resultado;
		echo '</fieldset>';	
	}